You can now add repository permissions to custom organization roles, granting a specific level of access to all the repositories in your organization.
This builds on the release of organization-wide permission grants in GitHub’s pre-defined organization roles. These updates enable admins to easily scale access management across large teams and organizations.
Using repository permissions in organization roles
Organization roles do not have to contain organization permissions (i.e. read_org_audit_log
) in order to include a repository role and permissions (i.e. close_issue
). This lets you create your own versions of the pre-defined organization base roles like Write
or Triage
, assigning those roles to everyone in your organization to ensure a set standard of access that matches your requirements.
A popular use case is to create elevated roles for your on-call rotation. For instance, a role based on Write
with the “Jump the merge queue” and “Request a solo merge” repository permissions added so that your on-call team can get that fixed quickly. Using the APIs you can automate assignment of this role to your current on-call, granting them those elevated permissions as a break-glass or shift-based privilege.
Managing repository access
Both the UI for organization role creation and the REST API have been updated to support repository permissions.
In addition, we’ve updated the repository access management page to distinguish between access granted by the repository owner to a user or team versus organization-wide grants made by the organization owner. This helps explain how a user got access to a specific repository.
For more information, see GitHub’s documentation as well as the REST API methods for automating role creation and assignment.